import Vue from 'vue'
import Router from 'vue-router'

//使用插件
Vue.use(Router)

//引入组件
import Login from '../views/login'
import Home from '../views/home'

//实例化Router对象
const router = new Router({
    mode:"history",
    routes:[
        {path:'',redirect:'/login'},
        {path:'/login',component:Login},
        {path:'/home',component:Home}
    ]
})

export default router